package com.wnn.demo.pojo;


import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
public enum ResultCode {

    OK(true,200,"操作成功！"),
    YES(true,0,"操作成功！"),
    SUCCESS(true,200),
    FALSE(false,500,"操作失败"),   //用于异常
    ERROR(false,400,"参数错误"),
    ERROR1(false,250,"账号已存在"),
    NULL(false,400),    //用于参数错误
    NULLPARM(false,400,"无效参数"),
    RoleNULL(false,400,"角色为空"),
    UNAUTHORISE(false,10003,"权限不足"),
    IMAGECONTENTERROR(false,400,"图片内容错误"),
    IMAGEFORMATWRONG(false,400,"图片格式错误"),
    Hava_Child_Menu_Dont_Edit(false,400,"该菜单拥有子集菜单，禁止转换成子类菜单!"),
    Hava_Child_Menu_Dont_Deleted(false,400,"该菜单拥有子集菜单，禁止删除!");


    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String msg;


    ResultCode(boolean success,int code, String msg){
        this.success = success;
        this.code = code;
        this.msg = msg;
    }

    ResultCode(boolean success,int code){
        this.success = success;
        this.code = code;
    }
}
